package cn.wzc.crystal.platform.logic;

import cn.wzc.crystal.platform.support.Code;

public abstract class LogicHelper {

	public static void mustNotNull(Code code, Object notNull) {
		if (null == notNull) {
			throw LogicException.from(code);
		}
	}


	public static void mustNull(Code code, Object notNull) {
		if (null != notNull) {
			throw LogicException.from(code);
		}
	}


	public static void mustTrue(Code code, Boolean value) {
		if (!value) {
			throw LogicException.from(code);
		}
	}


	public static void mustNotTrue(Code code, Boolean value) {
		if (value) {
			throw LogicException.from(code);
		}
	}


}
